package com.yanqu.road.server.cmd.kowloon;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.WingRoomChakraProto.WingRoomChakraProto;
import com.yanqu.road.pb.kowloon.KowloonProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.CmdApi;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.kowloon.KowloonModule;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.Protocol;

import java.util.ArrayList;
import java.util.List;

@CmdApi(reqMsg = KowloonProto.KowloonFastPassReqMsg.class, respMsg = KowloonProto.KowloonFastPassRespMsg.class)
@Cmd(code = Protocol.S_KOWLOON_FAST_PASS, desc = "九龙城寨-快速过关")
public class KowloonFastPassCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        KowloonProto.KowloonFastPassReqMsg req = KowloonProto.KowloonFastPassReqMsg.parseFrom(packet.getBytes());
        KowloonProto.KowloonFastPassRespMsg.Builder respMsg = player.getModule(KowloonModule.class).fastPass(req);
        player.sendPacket(ClientProtocol.U_KOWLOON_FAST_PASS, respMsg);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
